A program is static code. A process is that code in action! 🚀
| Term | Definition | State |
|---|---|---|
| Program 📄 | An executable file stored on the disk. | Passive (Doing nothing) |
| Process 🃠| A program currently running in memory (RAM). | Active (Executing tasks) |
Every active Process has unique identifiers:
Before we dive into commands, let's clear up some terms:
ps & ps auxps)Shows only processes running in the current shell session.
ps
# Output shows very few processes (usually just bash and ps itself)
ps aux)The gold standard for viewing system activity.
ps aux
# Shows ALL processes from ALL users
Flags Breakdown:
a: All users' processes.u: Display user/owner information.x: Include processes not attached to a terminal (background/daemons).Want to see what's creating load in real-time?
topUpdates in real-time.
top
# Press 'q' to quit
htopColorful, interactive, and user-friendly. You can even use your mouse! 🖱ï¸
htop
# A visual upgrade to top
Who controls the process?
Rule: You can only kill or manage processes you own (unless you represent the "Bank", i.e., root).
kali (User): Can control/kill processes owned by kali.root (Admin): Can control ANY process.